﻿#region Usings

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

#endregion

namespace DbConvertor.Dao.Entities
{
    [DisplayColumn("Eva")]
    public class Station
    {
        #region Primitive Properties

        [Key]
        public long Id { get; set; }

        [Required]
        [MaxLength(60)]
        public string Name { get; set; }

        [Required]
        [MaxLength(7)]
        public string Eva { get; set; }

        [MaxLength(7)]
        public string Epa { get; set; }

        [MaxLength(4)]
        public string Tisp { get; set; }

        [Required]
        public bool ForSale { get; set; }

        [MaxLength(15)]
        public string X { get; set; }

        [MaxLength(15)]
        public string Y { get; set; }

        [Required]
        public bool IsBorder { get; set; }

        [MaxLength(60)]
        public string BorderName { get; set; }

        [MaxLength(7)]
        public string BorderEva { get; set; }

        public int BorderCorrection { get; set; }

        #endregion

        #region Navigation Properties

        [Required]
        public virtual Ru Ru { get; set; }

        [InverseProperty("Station1")]
        public virtual ICollection<Distance> Distances1 { get; set; }

        [InverseProperty("Station2")]
        public virtual ICollection<Distance> Distances2 { get; set; }

        [InverseProperty("Station")]
        public virtual ICollection<RelationDescription> RelationDescriptions { get; set; }

        #endregion
    }
}